/**
 * Copyright (c) 2013, 2016 itemis AG (http://www.itemis.eu) and others.
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License 2.0 which is available at
 * http://www.eclipse.org/legal/epl-2.0.
 * 
 * SPDX-License-Identifier: EPL-2.0
 */
package org.eclipse.xtend.core.tests.compiler;

import org.eclipse.xtend2.lib.StringConcatenation;
import org.junit.Ignore;
import org.junit.Test;

/**
 * @author Sebastian Zarnekow - Initial contribution and API
 */
@SuppressWarnings("all")
public class Java8OverloadCompilerTest extends AbstractXtendCompilerTest {
  @Test
  public void testBug438461_01() {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("import java.util.concurrent.ExecutorService");
    _builder.newLine();
    _builder.append("class Bug {");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void m(ExecutorService service) {");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("service.submit [ /* Callable /w null */ ]");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("}");
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    StringConcatenation _builder_1 = new StringConcatenation();
    _builder_1.append("import java.util.concurrent.Callable;");
    _builder_1.newLine();
    _builder_1.append("import java.util.concurrent.ExecutorService;");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("@SuppressWarnings(\"all\")");
    _builder_1.newLine();
    _builder_1.append("public class Bug {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void m(final ExecutorService service) {");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("final Callable<Object> _function = new Callable<Object>() {");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("public Object call() throws Exception {");
    _builder_1.newLine();
    _builder_1.append("        ");
    _builder_1.append("return null;");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("};");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("service.<Object>submit(_function);");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("}");
    _builder_1.newLine();
    this.assertCompilesTo(_builder, _builder_1);
  }

  @Test
  public void testBug438461_02() {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("import java.util.concurrent.ExecutorService");
    _builder.newLine();
    _builder.append("class Bug {");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void m(ExecutorService service) {");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("service.submit [ return /* Runnable */ ]");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("}");
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    StringConcatenation _builder_1 = new StringConcatenation();
    _builder_1.append("import java.util.concurrent.ExecutorService;");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("@SuppressWarnings(\"all\")");
    _builder_1.newLine();
    _builder_1.append("public class Bug {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void m(final ExecutorService service) {");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("final Runnable _function = new Runnable() {");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("public void run() {");
    _builder_1.newLine();
    _builder_1.append("        ");
    _builder_1.append("return;");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("};");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("service.submit(_function);");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("}");
    _builder_1.newLine();
    this.assertCompilesTo(_builder, _builder_1);
  }

  @Test
  public void testBug438461_03() {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("import java.util.concurrent.ExecutorService");
    _builder.newLine();
    _builder.append("class Bug {");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void m(ExecutorService service) {");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("service.submit [ return \'\' /* Callable */ ]");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("}");
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    StringConcatenation _builder_1 = new StringConcatenation();
    _builder_1.append("import java.util.concurrent.Callable;");
    _builder_1.newLine();
    _builder_1.append("import java.util.concurrent.ExecutorService;");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("@SuppressWarnings(\"all\")");
    _builder_1.newLine();
    _builder_1.append("public class Bug {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void m(final ExecutorService service) {");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("final Callable<String> _function = new Callable<String>() {");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("public String call() throws Exception {");
    _builder_1.newLine();
    _builder_1.append("        ");
    _builder_1.append("return \"\";");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("};");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("service.<String>submit(_function);");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("}");
    _builder_1.newLine();
    this.assertCompilesTo(_builder, _builder_1);
  }

  @Test
  public void testBug438461_04() {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("import java.util.concurrent.ExecutorService");
    _builder.newLine();
    _builder.append("class Bug {");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void m(ExecutorService service) {");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("service.submit [ \'\' /* Callable */ ]");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("}");
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    StringConcatenation _builder_1 = new StringConcatenation();
    _builder_1.append("import java.util.concurrent.Callable;");
    _builder_1.newLine();
    _builder_1.append("import java.util.concurrent.ExecutorService;");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("@SuppressWarnings(\"all\")");
    _builder_1.newLine();
    _builder_1.append("public class Bug {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void m(final ExecutorService service) {");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("final Callable<String> _function = new Callable<String>() {");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("public String call() throws Exception {");
    _builder_1.newLine();
    _builder_1.append("        ");
    _builder_1.append("return \"\";");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("};");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("service.<String>submit(_function);");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("}");
    _builder_1.newLine();
    this.assertCompilesTo(_builder, _builder_1);
  }

  @Test
  public void testBug438461_05() {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("import java.util.concurrent.ExecutorService");
    _builder.newLine();
    _builder.append("class Bug {");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void m() {}");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void m(ExecutorService service) {");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("service.submit [ m() /* Runnable */ ]");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("}");
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    StringConcatenation _builder_1 = new StringConcatenation();
    _builder_1.append("import java.util.concurrent.ExecutorService;");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("@SuppressWarnings(\"all\")");
    _builder_1.newLine();
    _builder_1.append("public class Bug {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void m() {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void m(final ExecutorService service) {");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("final Runnable _function = new Runnable() {");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("public void run() {");
    _builder_1.newLine();
    _builder_1.append("        ");
    _builder_1.append("Bug.this.m();");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("};");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("service.submit(_function);");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("}");
    _builder_1.newLine();
    this.assertCompilesTo(_builder, _builder_1);
  }

  @Test
  public void testBug438461_06() {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("class Bug {");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void m(I... i) {}");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void m(Iterable<I> i) {");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("m [ run ]");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("}");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("interface I {");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("def void bind(Runnable r)");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("}");
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    StringConcatenation _builder_1 = new StringConcatenation();
    _builder_1.append("@SuppressWarnings(\"all\")");
    _builder_1.newLine();
    _builder_1.append("public class Bug {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public interface I {");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("void bind(final Runnable r);");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void m(final Bug.I... i) {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void m(final Iterable<Bug.I> i) {");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("final Bug.I _function = new Bug.I() {");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("public void bind(final Runnable it) {");
    _builder_1.newLine();
    _builder_1.append("        ");
    _builder_1.append("it.run();");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("};");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("this.m(_function);");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("}");
    _builder_1.newLine();
    this.assertCompilesTo(_builder, _builder_1);
  }

  @Test
  public void testBug438461_07() {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("class Bug {");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void m(I i) {}");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void m(Iterable<I> i) {");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("m [ run ]");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("}");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("interface I {");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("def void bind(Runnable r)");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("}");
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    StringConcatenation _builder_1 = new StringConcatenation();
    _builder_1.append("@SuppressWarnings(\"all\")");
    _builder_1.newLine();
    _builder_1.append("public class Bug {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public interface I {");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("void bind(final Runnable r);");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void m(final Bug.I i) {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void m(final Iterable<Bug.I> i) {");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("final Bug.I _function = new Bug.I() {");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("public void bind(final Runnable it) {");
    _builder_1.newLine();
    _builder_1.append("        ");
    _builder_1.append("it.run();");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("};");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("this.m(_function);");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("}");
    _builder_1.newLine();
    this.assertCompilesTo(_builder, _builder_1);
  }

  @Test
  public void testBug438461_08() {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("class Bug {");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void m(I... i) {}");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void m(Iterable<I>... i) {");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("m [ run ]");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("}");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("interface I {");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("def void bind(Runnable r)");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("}");
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    StringConcatenation _builder_1 = new StringConcatenation();
    _builder_1.append("@SuppressWarnings(\"all\")");
    _builder_1.newLine();
    _builder_1.append("public class Bug {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public interface I {");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("void bind(final Runnable r);");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void m(final Bug.I... i) {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void m(final Iterable<Bug.I>... i) {");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("final Bug.I _function = new Bug.I() {");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("public void bind(final Runnable it) {");
    _builder_1.newLine();
    _builder_1.append("        ");
    _builder_1.append("it.run();");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("};");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("this.m(_function);");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("}");
    _builder_1.newLine();
    this.assertCompilesTo(_builder, _builder_1);
  }

  @Test
  public void testBug438461_09() {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("class Bug {");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void m((String, String)=>void f) {}");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void m(()=>String f) {");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("m [ \'\' ]");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("}");
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    StringConcatenation _builder_1 = new StringConcatenation();
    _builder_1.append("import org.eclipse.xtext.xbase.lib.Functions.Function0;");
    _builder_1.newLine();
    _builder_1.append("import org.eclipse.xtext.xbase.lib.Procedures.Procedure2;");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("@SuppressWarnings(\"all\")");
    _builder_1.newLine();
    _builder_1.append("public class Bug {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void m(final Procedure2<? super String, ? super String> f) {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void m(final Function0<? extends String> f) {");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("final Function0<String> _function = new Function0<String>() {");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("public String apply() {");
    _builder_1.newLine();
    _builder_1.append("        ");
    _builder_1.append("return \"\";");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("};");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("this.m(_function);");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("}");
    _builder_1.newLine();
    this.assertCompilesTo(_builder, _builder_1);
  }

  @Test
  public void testBug438461_10() {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("class Bug {");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void m((String, String)=>String f) {}");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void m(()=>void f) {");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("m [ $0 + $1 ]");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("}");
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    StringConcatenation _builder_1 = new StringConcatenation();
    _builder_1.append("import org.eclipse.xtext.xbase.lib.Functions.Function2;");
    _builder_1.newLine();
    _builder_1.append("import org.eclipse.xtext.xbase.lib.Procedures.Procedure0;");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("@SuppressWarnings(\"all\")");
    _builder_1.newLine();
    _builder_1.append("public class Bug {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void m(final Function2<? super String, ? super String, ? extends String> f) {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void m(final Procedure0 f) {");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("final Function2<String, String, String> _function = new Function2<String, String, String>() {");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("public String apply(final String $0, final String $1) {");
    _builder_1.newLine();
    _builder_1.append("        ");
    _builder_1.append("return ($0 + $1);");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("};");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("this.m(_function);");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("}");
    _builder_1.newLine();
    this.assertCompilesTo(_builder, _builder_1);
  }

  @Test
  public void testBug438461_11() {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("class Bug {");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void m((String, String)=>void f) {}");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void m(()=>String... f) {");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("m [ \'\' ]");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("}");
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    StringConcatenation _builder_1 = new StringConcatenation();
    _builder_1.append("import org.eclipse.xtext.xbase.lib.Functions.Function0;");
    _builder_1.newLine();
    _builder_1.append("import org.eclipse.xtext.xbase.lib.Procedures.Procedure2;");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("@SuppressWarnings(\"all\")");
    _builder_1.newLine();
    _builder_1.append("public class Bug {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void m(final Procedure2<? super String, ? super String> f) {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void m(final Function0<? extends String>... f) {");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("final Function0<String> _function = new Function0<String>() {");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("public String apply() {");
    _builder_1.newLine();
    _builder_1.append("        ");
    _builder_1.append("return \"\";");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("};");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("this.m(_function);");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("}");
    _builder_1.newLine();
    this.assertCompilesTo(_builder, _builder_1);
  }

  @Test
  public void testBug438461_12() {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("class Bug {");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void m((String, String)=>String... f) {}");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void m(()=>void f) {");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("m [ $0 + $1 ]");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("}");
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    StringConcatenation _builder_1 = new StringConcatenation();
    _builder_1.append("import org.eclipse.xtext.xbase.lib.Functions.Function2;");
    _builder_1.newLine();
    _builder_1.append("import org.eclipse.xtext.xbase.lib.Procedures.Procedure0;");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("@SuppressWarnings(\"all\")");
    _builder_1.newLine();
    _builder_1.append("public class Bug {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void m(final Function2<? super String, ? super String, ? extends String>... f) {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void m(final Procedure0 f) {");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("final Function2<String, String, String> _function = new Function2<String, String, String>() {");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("public String apply(final String $0, final String $1) {");
    _builder_1.newLine();
    _builder_1.append("        ");
    _builder_1.append("return ($0 + $1);");
    _builder_1.newLine();
    _builder_1.append("      ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("};");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("this.m(_function);");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("}");
    _builder_1.newLine();
    this.assertCompilesTo(_builder, _builder_1);
  }

  @Test
  public void test_01() {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("import java.util.List");
    _builder.newLine();
    _builder.append("import java.util.Arrays");
    _builder.newLine();
    _builder.append("class C {");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void x() {");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("m(Arrays.asList(1));");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("}");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void m(Object o) {}");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void m(List<Number> ln) {}");
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    StringConcatenation _builder_1 = new StringConcatenation();
    _builder_1.append("import java.util.Arrays;");
    _builder_1.newLine();
    _builder_1.append("import java.util.List;");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("@SuppressWarnings(\"all\")");
    _builder_1.newLine();
    _builder_1.append("public class C {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void x() {");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("this.m(Arrays.<Number>asList(Integer.valueOf(1)));");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void m(final Object o) {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void m(final List<Number> ln) {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("}");
    _builder_1.newLine();
    this.assertCompilesTo(_builder, _builder_1);
  }

  @Test
  public void test_02() {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("import java.util.List");
    _builder.newLine();
    _builder.append("import java.util.Arrays");
    _builder.newLine();
    _builder.append("class C {");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void x() {");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("m(Arrays.asList(1, 2));");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("}");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void m(Object o) {}");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void m(List<Number> ln) {}");
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    StringConcatenation _builder_1 = new StringConcatenation();
    _builder_1.append("import java.util.Arrays;");
    _builder_1.newLine();
    _builder_1.append("import java.util.List;");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("@SuppressWarnings(\"all\")");
    _builder_1.newLine();
    _builder_1.append("public class C {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void x() {");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("this.m(Arrays.<Number>asList(Integer.valueOf(1), Integer.valueOf(2)));");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void m(final Object o) {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void m(final List<Number> ln) {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("}");
    _builder_1.newLine();
    this.assertCompilesTo(_builder, _builder_1);
  }

  @Ignore("Improve deferred type parameter resolution")
  @Test
  public void test_03() {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("import java.util.List");
    _builder.newLine();
    _builder.append("import java.util.Arrays");
    _builder.newLine();
    _builder.append("class C {");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void x() {");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("var arr = Arrays.asList(1, 2)");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("m(arr);");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("}");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void m(Object o) {}");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void m(List<Number> ln) {}");
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    StringConcatenation _builder_1 = new StringConcatenation();
    _builder_1.append("import java.util.Arrays;");
    _builder_1.newLine();
    _builder_1.append("import java.util.List;");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("@SuppressWarnings(\"all\")");
    _builder_1.newLine();
    _builder_1.append("public class C {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void x() {");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("List<Number> arr = Arrays.<Number>asList(Integer.valueOf(1), Integer.valueOf(2));");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("this.m(arr);");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void m(final Object o) {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void m(final List<Number> ln) {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("}");
    _builder_1.newLine();
    this.assertCompilesTo(_builder, _builder_1);
  }

  @Test
  public void test_04() {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("import java.util.List");
    _builder.newLine();
    _builder.append("import java.util.Arrays");
    _builder.newLine();
    _builder.append("class C {");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void x(Integer[] ints) {");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("m(Arrays.asList(ints));");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("}");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void m(Object o) {}");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void m(List<Number> ln) {}");
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    StringConcatenation _builder_1 = new StringConcatenation();
    _builder_1.append("import java.util.Arrays;");
    _builder_1.newLine();
    _builder_1.append("import java.util.List;");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("@SuppressWarnings(\"all\")");
    _builder_1.newLine();
    _builder_1.append("public class C {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void x(final Integer[] ints) {");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("this.m(Arrays.<Number>asList(ints));");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void m(final Object o) {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void m(final List<Number> ln) {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("}");
    _builder_1.newLine();
    this.assertCompilesTo(_builder, _builder_1);
  }

  @Test
  public void test_05() {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("import java.util.List");
    _builder.newLine();
    _builder.append("import java.util.Arrays");
    _builder.newLine();
    _builder.append("class C {");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void x() {");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("m(Arrays.asList());");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("}");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void m(Object o) {}");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void m(List<Number> ln) {}");
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    StringConcatenation _builder_1 = new StringConcatenation();
    _builder_1.append("import java.util.Arrays;");
    _builder_1.newLine();
    _builder_1.append("import java.util.List;");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("@SuppressWarnings(\"all\")");
    _builder_1.newLine();
    _builder_1.append("public class C {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void x() {");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("this.m(Arrays.<Number>asList());");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void m(final Object o) {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void m(final List<Number> ln) {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("}");
    _builder_1.newLine();
    this.assertCompilesTo(_builder, _builder_1);
  }

  @Test
  public void test_06() {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("import java.util.List");
    _builder.newLine();
    _builder.append("import java.util.Arrays");
    _builder.newLine();
    _builder.append("class C {");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void x() {");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("m(Arrays.asList(1));");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("}");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void m(Object o) {}");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void m(List<? extends Number> ln) {}");
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    StringConcatenation _builder_1 = new StringConcatenation();
    _builder_1.append("import java.util.Arrays;");
    _builder_1.newLine();
    _builder_1.append("import java.util.List;");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("@SuppressWarnings(\"all\")");
    _builder_1.newLine();
    _builder_1.append("public class C {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void x() {");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("this.m(Arrays.<Integer>asList(Integer.valueOf(1)));");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void m(final Object o) {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void m(final List<? extends Number> ln) {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("}");
    _builder_1.newLine();
    this.assertCompilesTo(_builder, _builder_1);
  }

  @Test
  public void test_07() {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("import java.util.List");
    _builder.newLine();
    _builder.append("import java.util.Arrays");
    _builder.newLine();
    _builder.append("class C {");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void x() {");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("m(Arrays.asList(1, 2));");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("}");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void m(Object o) {}");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void m(List<? extends Number> ln) {}");
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    StringConcatenation _builder_1 = new StringConcatenation();
    _builder_1.append("import java.util.Arrays;");
    _builder_1.newLine();
    _builder_1.append("import java.util.List;");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("@SuppressWarnings(\"all\")");
    _builder_1.newLine();
    _builder_1.append("public class C {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void x() {");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("this.m(Arrays.<Integer>asList(Integer.valueOf(1), Integer.valueOf(2)));");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void m(final Object o) {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void m(final List<? extends Number> ln) {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("}");
    _builder_1.newLine();
    this.assertCompilesTo(_builder, _builder_1);
  }

  @Test
  public void test_08() {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("import java.util.List");
    _builder.newLine();
    _builder.append("import java.util.Arrays");
    _builder.newLine();
    _builder.append("class C {");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void x() {");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("m(Arrays.asList());");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("}");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void m(Object o) {}");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void m(List<? extends Number> ln) {}");
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    StringConcatenation _builder_1 = new StringConcatenation();
    _builder_1.append("import java.util.Arrays;");
    _builder_1.newLine();
    _builder_1.append("import java.util.List;");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("@SuppressWarnings(\"all\")");
    _builder_1.newLine();
    _builder_1.append("public class C {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void x() {");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("this.m(Arrays.<Number>asList());");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void m(final Object o) {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void m(final List<? extends Number> ln) {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("}");
    _builder_1.newLine();
    this.assertCompilesTo(_builder, _builder_1);
  }

  @Test
  public void test_09() {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("import java.util.List");
    _builder.newLine();
    _builder.append("import java.util.Arrays");
    _builder.newLine();
    _builder.append("class C {");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void x() {");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("m(Arrays.asList(1));");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("}");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void m(Object o) {}");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void m(List<? super Number> ln) {}");
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    StringConcatenation _builder_1 = new StringConcatenation();
    _builder_1.append("import java.util.Arrays;");
    _builder_1.newLine();
    _builder_1.append("import java.util.List;");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("@SuppressWarnings(\"all\")");
    _builder_1.newLine();
    _builder_1.append("public class C {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void x() {");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("this.m(Arrays.<Number>asList(Integer.valueOf(1)));");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void m(final Object o) {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void m(final List<? super Number> ln) {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("}");
    _builder_1.newLine();
    this.assertCompilesTo(_builder, _builder_1);
  }

  @Test
  public void test_10() {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("import java.util.List");
    _builder.newLine();
    _builder.append("import java.util.Arrays");
    _builder.newLine();
    _builder.append("class C {");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void x() {");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("m(Arrays.asList(1, 2));");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("}");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void m(Object o) {}");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void m(List<? super Number> ln) {}");
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    StringConcatenation _builder_1 = new StringConcatenation();
    _builder_1.append("import java.util.Arrays;");
    _builder_1.newLine();
    _builder_1.append("import java.util.List;");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("@SuppressWarnings(\"all\")");
    _builder_1.newLine();
    _builder_1.append("public class C {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void x() {");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("this.m(Arrays.<Number>asList(Integer.valueOf(1), Integer.valueOf(2)));");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void m(final Object o) {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void m(final List<? super Number> ln) {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("}");
    _builder_1.newLine();
    this.assertCompilesTo(_builder, _builder_1);
  }

  @Test
  public void test_11() {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("import java.util.List");
    _builder.newLine();
    _builder.append("import java.util.Arrays");
    _builder.newLine();
    _builder.append("class C {");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void x() {");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("m(Arrays.asList());");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("}");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void m(Object o) {}");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void m(List<? super Number> ln) {}");
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    StringConcatenation _builder_1 = new StringConcatenation();
    _builder_1.append("import java.util.Arrays;");
    _builder_1.newLine();
    _builder_1.append("import java.util.List;");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("@SuppressWarnings(\"all\")");
    _builder_1.newLine();
    _builder_1.append("public class C {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void x() {");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("this.m(Arrays.<Number>asList());");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void m(final Object o) {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void m(final List<? super Number> ln) {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("}");
    _builder_1.newLine();
    this.assertCompilesTo(_builder, _builder_1);
  }

  @Ignore("Improve deferred type parameter resolution")
  @Test
  public void test_12() {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("import java.util.List");
    _builder.newLine();
    _builder.append("import java.util.Arrays");
    _builder.newLine();
    _builder.append("class C {");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void x() {");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("var arr = Arrays.asList(1)");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("m(arr);");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("}");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void m(Object o) {}");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void m(List<Number> ln) {}");
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    StringConcatenation _builder_1 = new StringConcatenation();
    _builder_1.append("import java.util.Arrays;");
    _builder_1.newLine();
    _builder_1.append("import java.util.List;");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("@SuppressWarnings(\"all\")");
    _builder_1.newLine();
    _builder_1.append("public class C {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void x() {");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("List<Number> arr = Arrays.<Number>asList(Integer.valueOf(1));");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("this.m(arr);");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void m(final Object o) {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void m(final List<Number> ln) {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("}");
    _builder_1.newLine();
    this.assertCompilesTo(_builder, _builder_1);
  }

  @Ignore("TODO implement this properly")
  @Test
  public void test_13() {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("class C {");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void x() {");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("val Iterable<Iterable<Number>> l = newArrayList(newArrayList(1))");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("}");
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    StringConcatenation _builder_1 = new StringConcatenation();
    _builder_1.append("import java.util.ArrayList;");
    _builder_1.newLine();
    _builder_1.append("import org.eclipse.xtext.xbase.lib.CollectionLiterals;");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("@SuppressWarnings(\"all\")");
    _builder_1.newLine();
    _builder_1.append("public class C {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void x() {");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("this.m(Arrays.<Number>asList(Integer.valueOf(1), Integer.valueOf(2)));");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("}");
    _builder_1.newLine();
    this.assertCompilesTo(_builder, _builder_1);
  }

  @Test
  public void test_14() {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("class C {");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void x() {");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("val l = newArrayList");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("l.add(1)");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("val Iterable<Number> l2 = l");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("}");
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    StringConcatenation _builder_1 = new StringConcatenation();
    _builder_1.append("import java.util.ArrayList;");
    _builder_1.newLine();
    _builder_1.append("import org.eclipse.xtext.xbase.lib.CollectionLiterals;");
    _builder_1.newLine();
    _builder_1.newLine();
    _builder_1.append("@SuppressWarnings(\"all\")");
    _builder_1.newLine();
    _builder_1.append("public class C {");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("public void x() {");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("final ArrayList<Number> l = CollectionLiterals.<Number>newArrayList();");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("l.add(Integer.valueOf(1));");
    _builder_1.newLine();
    _builder_1.append("    ");
    _builder_1.append("final Iterable<Number> l2 = l;");
    _builder_1.newLine();
    _builder_1.append("  ");
    _builder_1.append("}");
    _builder_1.newLine();
    _builder_1.append("}");
    _builder_1.newLine();
    this.assertCompilesTo(_builder, _builder_1);
  }
}
